package com.yztc.xiami_app.retrofitinterface;

import com.yztc.xiami_app.bean.goods.GoodsBean;
import com.yztc.xiami_app.bean.goodsdetails.GoodsDetailsBean;
import com.yztc.xiami_app.constant.URLConstant;
import com.yztc.xiami_app.ui.versionupdate.Version;

import java.util.Map;

import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by 周旭 on 2016/11/15.
 */

public interface RetrofitInterface {

    //获取商品列表数据
    @GET(URLConstant.URL_GOODS_PATH)
    Observable<GoodsBean> getGoodsBean(@QueryMap Map<String,Object> params);

    //获取商品详情的数据
    @GET(URLConstant.URL_GOODS_DETAIL_PATH)
    Observable<GoodsDetailsBean> getGoodsDetailsBean(@Query(URLConstant.PRODUCTID) String productId);

    //模拟APP更新时，获取Version的数据
    @GET(URLConstant.VersionCode.URL_VERSION_PATH)
    Observable<Version> getVersionBean();
}
